<%@ page import="com.webamc.common.enums.Params" %>
<%
    String popupHolder = "popupHolder";
    String popupFrame = "popupFrame";
%>
<script type="text/javascript">
    function showMe(src, target) {
        var popupHolder = document.getElementById('<%=popupHolder%>');
        var popupFrame = document.getElementById('<%=popupFrame%>');
//        alert(src + arguments[1])

        popupFrame.src = src + "&<%=Params.POPUP%>=" + target;
        popupHolder.style.display = "block";
    }

    function selectMe() {
        var names = arguments[0].split(",");
//        alert(names)
        for (var i=0;i<names.length;i++) {
            var textBoxArr = document.getElementsByName(names[i]);
//            alert(names[i] + "," + textBoxArr.length + ","+ arguments[i+1])
            if (textBoxArr.length > 0) {
                textBoxArr[0].value = arguments[i+1];
            }
        }

        hideMe(); //popup
    }

    function hideMe() {
        var popupHolder = document.getElementById('<%=popupHolder%>');
        popupHolder.style.display = "none";
    }
</script>

<div id="<%=popupHolder%>" class="dir" style="
        background-color:#ffffff;
        border : 2px solid #336699;
        left : 5%;
        top : 5%;
        width : 80%;
        height : 80%;
        display:none;
        position:absolute;">
    <a style="  color:#111111;
                    cursor:pointer;
                 	font:normal 14pt verdana;
                    background-color:#aaccff;
                    position:absolute;
                    left:90%;
                    "
       href="javascript:hideMe()">close</a>
    <iframe frameborder="0" id="<%=popupFrame%>"
            style="display:block; width:100%; height:100%;">
    </iframe>
</div>

